<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();

	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path;
%>
<%@taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>

<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<meta name="copyright" content="" />
		<meta name="keywords" content="" />
		<meta name="description" content="" />
		
		<title>全员营销活动 - 参与名单 - 列表页</title>
		
		<link href="<%=path%>/favicon.ico" rel="shortcut icon">
		<link href="https://cdn.jsdelivr.net/gh/bootcdn/BootCDN/ajax/libs/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
		<link rel="stylesheet" type="text/css" href="<%=path%>/css/marketing/public.css" />
		<link rel="stylesheet" type="text/css" href="<%=path%>/css/marketing/activity.css" />
		<link rel="stylesheet" type="text/css" href="<%=path%>/css/marketing/custom.css" />
		<link rel="stylesheet" type="text/css" href="<%=path%>/css/marketing/style_list.css" />  
		<link rel="stylesheet" type="text/css" href="<%=path%>/css/marketing/marketing.css" />
	
		<link href="<%=path%>/hplus/css/bootstrap.min14ed.css?v=3.3.6" rel="stylesheet">
		<link href="<%=path%>/hplus/css/font-awesome.min93e3.css?v=4.4.0" rel="stylesheet">
		<link href="<%=path%>/hplus/css/plugins/iCheck/custom.css" rel="stylesheet">
		<link href="<%=path%>/hplus/css/plugins/footable/footable.core.css" rel="stylesheet">
		<link rel="stylesheet" type="text/css" href="<%=path%>/hplus/css/plugins/dataTables/css/jquery.dataTables.min.css" />
		<link href="<%=path%>/hplus/css/animate.min.css" rel="stylesheet">
		<link href="<%=path%>/hplus/css/style.min862f.css?v=4.1.0" rel="stylesheet">
		<link href="<%=path%>/hplus/css/plugins/clockpicker/clockpicker.css" rel="stylesheet">
		<link href="<%=path%>/hplus/css/plugins/datapicker/datepicker3.css" rel="stylesheet">
		<link rel="stylesheet" type="text/css" href="<%=path%>/hplus/js/plugins/sweetalert/sweetalert2.min.css">
		
		<style type="text/css">
			.div-serch{
				margin-left:20px;
			}
		</style>
		
	</head>
	<body>
		<div class="wrapper wrapper-content animated fadeInRight">
			<div class="container-fluid">
				<!-- 搜索 -->
				<div class="row searchCondition" style="background-color: white;padding: 10px;">
					<div class="row">
			            <div class="col-sm-3" style="width:400px">
				            <div class="input-daterange input-group" id="datepicker">
			                    <input id="start-time" type="text" class="input-sm form-control" name="startTime" value="">
			                    <span class="input-group-addon" style="height: 24px;">到</span>
			                    <input id="end-time" type="text" class="input-sm form-control" name="endTime" value="">				
			                </div>
			            </div>
			            
			            <!-- 积分类型 0 邀请会员奖励 1邀请粉丝奖励 2活动点击奖励 3活动分享奖励 4操作员修改 -->
			            <label class="col-sm-3 " style="font-weight:10;width:75px;margin-top:10px;padding-right:0px">奖励原因</label>
			            <div class="col-sm-3" style="width:200px;padding-left:0px"> 
			              	<select id="score-type" class="form-control" style="">
			              		<option value="">请选择奖励原因</option>
								<option value="2">点击活动</option>
								<option value="3">分享活动</option>
								<option value="5">分享活动被他人点击</option>
								<option value="6">分享活动被他人分享</option>
							</select>
			            </div>
		                
		                <div class="col-sm-3" style="width:400px">
							OpenID
			                <input id="open-id" placeholder="请输入OpenID" class="form-control" style="width: 300px;display: inline-block;">
			            </div> 
			            
			            <div class="col-sm-3" >
			            	<button onclick="aemJoinList.search()" class="btn btn-primary" type="button">搜&nbsp &nbsp &nbsp &nbsp索</button>
			            </div>
			        </div> 
				</div>
				
				<!-- 功能按钮 -->
				<div class="row" style="background-color: white; float: right; padding-right:15px">
					<shiro:hasPermission name="partake:export_csv">
						<span><button id="create-aem" type="button" class="btn btn-primary" onclick="aemJoinList.exportAemJoinList()">导出CSV</button></span>
					</shiro:hasPermission>
				</div>
				
				<div class="row">
					<div class="col-sm-12 " style="margin-top: 20px;">
						<div class="ibox float-e-margins white-bg">
							<div class="table-responsive">
								<table class="display  table-striped table-bordered " id="page-list-table">
									<thead>
										<tr>
											<th>微信昵称</th>
											<th>OpenID</th>
											<th>用户身份</th>
											<th>奖励时间</th>
											<th>奖励原因</th>
											<th>来源昵称</th>
											<th>来源OpenId</th>
											<th>奖励内容</th>
										</tr>
									</thead>
									<tbody style="font-size: 15px"></tbody>
								</table>
							</div>
						</div>
					</div>
				</div>    <!-- row end -->
	
			</div>
		</div>
	
	
		<div hidden="" class="modal inmodal fade" id="myModal5" tabindex="-1" role="dialog" aria-hidden="true">
			<div class="modal-dialog modal-sm">
				<div class="modal-content">
					<div class="modal-header">
						<button type="button" class="close" data-dismiss="modal">
							<span aria-hidden="true">&times;</span><span class="sr-only">Close</span>
						</button>
						<h4 class="modal-title">扫一扫立刻分享</h4>
					</div>
					<div class="modal-body text-center">
						<div id="qrcode"></div>
					</div>
				</div>
			</div>
		</div>


	</body>
</html>


<script src="<%=path%>/hplus/js/jquery.min.js?v=2.1.4"></script>
<script type="text/javascript" src="<%=path%>/hplus/js/plugins/dataTables/jquery.dataTables.min.js"></script>

<script src="<%=path%>/hplus/js/bootstrap.min.js?v=3.3.6"></script>
<script src="<%=path%>/hplus/js/plugins/chosen/chosen.jquery.js"></script>
<script src="<%=path%>/hplus/js/plugins/jsKnob/jquery.knob.js"></script>
<script src="<%=path%>/hplus/js/plugins/jasny/jasny-bootstrap.min.js"></script>
<script src="<%=path%>/hplus/js/plugins/datapicker/bootstrap-datepicker.js"></script>
<script src="<%=path%>/hplus/js/plugins/prettyfile/bootstrap-prettyfile.js"></script>
<script src="<%=path%>/hplus/js/plugins/switchery/switchery.js"></script>
<script src="<%=path%>/hplus/js/plugins/ionRangeSlider/ion.rangeSlider.min.js"></script>
<script src="<%=path%>/hplus/js/plugins/iCheck/icheck.min.js"></script>
<script src="<%=path%>/hplus/js/plugins/metisMenu/jquery.metisMenu.js"></script>
<script src="<%=path%>/hplus/js/plugins/colorpicker/bootstrap-colorpicker.min.js"></script>
<script src="<%=path%>/hplus/js/plugins/clockpicker/clockpicker.js"></script>
<script src="<%=path%>/hplus/js/plugins/cropper/cropper.min.js"></script>
<script src="<%=path%>/hplus/js/demo/form-advanced-demo.min.js"></script>
<script src="<%=path%>/hplus/js/plugins/suggest/bootstrap-suggest.min.js"></script>
<script src="<%=path%>/hplus/js/plugins/sweetalert/sweetalert2.min.js"></script>
<script type="text/javascript" src="<%=path%>/js/marketing/dialog.js"></script>
<script type="text/javascript" src="<%=path%>/js/marketing/public.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-cookie/1.4.1/jquery.cookie.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.qrcode/1.0/jquery.qrcode.min.js"></script>

<link href="<%=path%>/hplus/css/plugins/datapicker/bootstrap-datetimepicker.min.css" rel="stylesheet">
<script type="text/javascript" src="<%=path%>/hplus/js/plugins/datapicker/bootstrap-datetimepicker.min.js"></script>
<script type="text/javascript" src="<%=path%>/hplus/js/plugins/datapicker/bootstrap-datetimepicker.zh-CN.js"></script>

<!-- 全员营销活动 - 主脚本 -->
<script type="text/javascript" src="<%=path%>/js/aem/aem-wechat-join-list.js"></script> 
<script src="https://cdnjs.cloudflare.com/ajax/libs/artDialog/7.0.0/dialog-plus.js"></script>


<script type="text/javascript">
	$(function() {
	    Date.prototype.format = function(format){
	        var o = {
	            "M+" : this.getMonth()+1, //month
	            "d+" : this.getDate(),    //day
	            "h+" : this.getHours(),   //hour
	            "m+" : this.getMinutes(), //minute
	            "s+" : this.getSeconds(), //second
	            "q+" : Math.floor((this.getMonth()+3)/3),   
	            "S" : this.getMilliseconds() //millisecond
	        }
	        if(/(y+)/.test(format))
	            format=format.replace(RegExp.$1,(this.getFullYear()+"").substr(4 - RegExp.$1.length));
	        for(var k in o)if(new RegExp("("+ k +")").test(format))
	            format = format.replace(RegExp.$1, RegExp.$1.length==1 ? o[k] : ("00"+ o[k]).substr((""+ o[k]).length));
	        return format;
	    }
	});
	
	
	$(function(){
		aemJoinList.init('${aemInfoId}').dataTable();       
		var s = '${startTime}';
        var e = '${endTime}';
		var curDate = new Date();
		if('${status}' == '2'){
			// 活动开始不足7天,  默认显示 ：活动开始时间 至 当前时间的前一天
			var stime = (curDate.getTime() - new Date(s).getTime()) / (24*60*60*1000) >= 7;    
			if(stime){
				$('#start-time').datetimepicker({  
		            format: 'yyyy-mm-dd hh:ii:ss',
		            startDate : new Date(curDate.getTime() - 6*24*60*60*1000) ,
		            endDate : new Date(curDate.getTime())
		        });
		        $('#end-time').datetimepicker({  
		            format: 'yyyy-mm-dd hh:ii:ss',
		            startDate : new Date(curDate.getTime() - 6*24*60*60*1000) ,
		        	endDate : new Date(curDate.getTime())
		        });
		        $('#start-time').val(new Date(curDate.getTime() - 6*24*60*60*1000).format('yyyy-MM-dd hh:mm:ss') );
		        $('#end-time').val(new Date(curDate.getTime()).format('yyyy-MM-dd hh:mm:ss') );
			}else{
				$('#start-time').datetimepicker({  
		            format: 'yyyy-mm-dd hh:ii:ss',
		            startDate : new Date('${startTime}') ,
		            endDate : new Date(curDate.getTime()) 
		        });
		        $('#end-time').datetimepicker({  
		            format: 'yyyy-mm-dd hh:ii:ss',
		            startDate : new Date('${startTime}') ,
		        	endDate : new Date(curDate.getTime())
		        });
		        $('#start-time').val( new Date('${startTime}').format('yyyy-MM-dd hh:mm:ss') );
		        $('#end-time').val(new Date(curDate.getTime()).format('yyyy-MM-dd hh:mm:ss') );
			}
		}
		
		if('${status}' == 3){
			$('#start-time').datetimepicker({  
	            format: 'yyyy-mm-dd hh:ii:ss',
	            startDate : new Date('${startTime}') ,
	        	endDate : new Date('${endTime}')
	        });
	        
	        $('#end-time').datetimepicker({  
	            format: 'yyyy-mm-dd hh:ii:ss',
	            startDate : new Date('${startTime}') ,
	        	endDate : new Date('${endTime}')
	        });
	        $('#start-time').val(s.substring(0 , s.length - 2));
	        $('#end-time').val( e.substring(0 , e.length - 2) );
		}
	});
	
	
	
	
	
	
</script>






























